import axios from 'axios';

// 歌词
export function getLyric(mid) {
  const url = '/api/getSongInfo'

  const data = Object.assign({}, {
    callback: MusicJsonCallback_lrc(),
    pcachetime: +new Date(),
    songmid: mid,
    g_tk: 1177221798,
    jsonpCallback: MusicJsonCallback_lrc(),
    loginUin: 0,
    hostUin: 0,
    format: 'json',
    inCharset: 'utf8',
    outCharset: 'utf-8',
    notice: 0,
    platform: 'yqq',
    needNewCode: 0
  })

  function MusicJsonCallback_lrc() {}

  return axios.get(url, {
    params: data
  }).then((res) => {
    return Promise.resolve(res.data)
  })
}
